import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
    {
        path: "/",
        name: "login",
        component: () => import("../pages/Aaccount/Login/index.vue"),
    },
    {
        path: "/home",
        name: "Home",
        component: () => import("../pages/Home/index.vue"),
        redirect: "/user",
        children: [
            {
                path: "/user",
                name: "/user",
                component: () => import("../pages/Users/index.vue"),
            },
        ],
    },
];

const router = createRouter({
    //通过 createWebHashHistory() 创建 hash 模式。
    history: createWebHashHistory(),
    routes,
});

export default router;
